<?php

namespace app\shop\model\company;

use app\shop\model\auth\User;

use think\Model;
/**
 * 应用模型
 */
class CompanyTeam extends Model
{
    protected $autoWriteTimestamp = true;

    public function teamClass()
    {
        return $this->belongsTo(CompanyTeamClass::class, 'class_id', 'id');
    }

    public function department()
    {
        return $this->belongsTo(Department::class, 'department_id', 'id');
    }

    public function author()
    {
        return $this->belongsTo(User::class, 'add_user', 'shop_user_id');
    }
}
